<div class="row-fluid sortable ui-sortable">
	<div id="form-stok-peternakan" class="box span12">
		<div class="box-header well" data-original-title>
			<h2 id="action-title">Perubahan Stok Sapi di Peternakan</h2>
			<div class="box-icon">
				<a href="#" class="btn btn-minimize btn-round"><i class="icon-chevron-up"></i></a>
			</div>
		</div>
		<div class="box-content">
			<form id="form-edit-peternakan" method="post" action="<?php echo base_url();?>stok_peternakan/input_history">
				<table class="table">
				<col width="10%">
				<col width="40%">
					<tbody>
						<tr>
							<td><label class="control-label">Peternakan</label></td>
							<td>
								<div class="controls">
								  <select data-rel="chosen" id="peternakan" name='peternakan'>
									<?php
										if($peternakan){
											foreach($peternakan->result_array() as $row){
												$row["NAMA_KOTA"] = str_replace("Kota","", $row["NAMA_KOTA"]);
												$row["NAMA_KOTA"] = str_replace("Kabupaten","", $row["NAMA_KOTA"]);
												echo "<option value='".$row["ID_TITIK_PASOK"]."'>".$row["NAMA_KOTA"].", ".$row["NAMA"]."</option>";
											}
										}
									?>
								  </select>
								</div>
							</td>
						</tr>
						<tr>
							<td><label class="control-label">Jenis Sapi</label></td>
							<td>
								<div class="controls">
								  <select data-rel="chosen" id="sapi" name='sapi'>
									<?php
										if($jenis_sapi){
											foreach($jenis_sapi->result_array() as $row){
												echo "<option value='".$row["ID_SAPI"]."'>".$row["NAMA"]."</option>";
											}
										}
									?>
								  </select>
								</div>
							</td>
						</tr>
						<tr>
							<td><label class="control-label">Alasan Perubahan</label></td>
							<td>
								<div class="controls">
								  <select data-rel="chosen" id="alasan" name='alasan'>
									<?php
										if($alasan){
											foreach($alasan->result_array() as $row){
												if($row["ID_ALASAN_PERUBAHAN"]!="4" && $row["ID_ALASAN_PERUBAHAN"]!="5" ){
													echo "<option value='".$row["ID_ALASAN_PERUBAHAN"]."'>".$row["NAMA_ALASAN_PERUBAHAN"]."</option>";
												}
											}
										}
									?>
								  </select>
								</div>
							</td>
						</tr>
						
						<tr>
							<td><label class="control-label">Jumlah</label></td>
							<td><input id="jumlah" type="text" name="jumlah"></input></td>
						</tr>
						<tr>
							<td><label class="control-label">Tanggal Kejadian</label></td>
							<td><input id="tanggal-kejadian" class="input-xmedium datepicker" type="text" name="tanggal-kejadian"></input></td>
						</tr>
						<tr>
							<td><label class="control-label">Catatan</label></td>
							<td><textarea id="catatan" name="catatan"></textarea></td>
						</tr>
						
						<tr>
							<td></td>							
							<td>
								<input type="reset" class="btn" value="Reset"></input>
								<input id="button-panel" type="submit" class="btn" value="Simpan"></input>
							</td>
						</tr>
					</tbody>
				</table>
			</form>
		</div>
	</div>
</div>
